package cn.bx.bid;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * war的方式执行
 * 1:必须添加一个类集成SpringBootServletInitializer
 * 2:去掉内置的tomcat,有好几种方式
 * <dependency>
 *          <groupId>org.springframework.boot</groupId>
 *          <artifactId>spring-boot-starter-tomcat</artifactId>
 *          <scope>provided</scope>
 * </dependency>
 *
 * 3:修改打包方式为war <packaging>jar</packaging>
 * 4:maven生成,然后就可以用tomcat测试了
 */
public class SpringBootStartApplication extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(BidApplication.class);
    }
}
